using System.Web.Mvc;
using Lucene.Net.Analysis;
using Lucene.Net.Store;
using WWB.SitePointPrivateMessages.Core.Model.Messages;

namespace WWB.SitePointPrivateMessages.Web.Controllers
{
    public class SpPmControllerBase : Controller
    {
        public MessageDatabase CurrentMessageDb
        {
            get { return Session["CurrentMessageDb"] as MessageDatabase; }
            set { Session["CurrentMessageDb"] = value; }
        }

        public Directory CurrentDirectory
        {
            get { return Session["CurrentDirectory"] as Directory; }
            set { Session["CurrentDirectory"] = value; }
        }

        public Analyzer CurrentAnalyzer
        {
            get { return Session["CurrentAnalyzer"] as Analyzer; }
            set { Session["CurrentAnalyzer"] = value;}
        }

        public string ErrorMessage
        {
            get { return TempData["ErrorMessage"] as string; }
            set { TempData["ErrorMessage"] = value; }
        }
    }
}